import http from "./axios.js";

// GET 请求方式
const httpGet = (url, params = {}) => {
	return http({
		url,
		method: "GET",
		params
	})
};
// POST 请求方式
const httpPost = (url, data = {}) => {
	return http({
		url,
		method: "POST",
		data
	})
};
// PUT 请求方式
const httpPut = (url, data = {}) => {
	return http({
		url,
		method: "PUT",
		data
	})
};
// DETELE 请求方式 url拼接
const httpDelete = (url, params = {}) => {
	return axios({
		url,
		method: "DELETE",
		params
	})
};
// DETELE 请求方式 传递参数
const httpDeleteData = (url, data = {}) => {
	return axios({
		url,
		method: "DELETE",
		data
	})
};

export {
	httpGet,
	httpPost,
	httpPut,
	httpDelete,
	httpDeleteData
};
